<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改用料采购申请')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-requisition-edit" th:object="${matePurRequisition}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">材料类型：</label>
                <div class="col-sm-8">
                    <input name="mName" th:field="*{mName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">申请人：</label>
                <div class="col-sm-8">
                    <input name="mApplicant" th:field="*{mApplicant}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">材料数量：</label>
                <div class="col-sm-8">
                    <input name="mNum" th:field="*{mNum}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group"style="display: none">
                <label class="col-sm-3 control-label">项目外键：</label>
                <div class="col-sm-8">
                    <input name="mId" th:field="*{mId}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label is-required">审批状态：</label>
                <div class="col-sm-8">
                    <select id="mStatus" name="mStatus" th:with="type=${@dict.getType('mate_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}">
                    </select>
                </div>
            </div>
            <div class="form-group" style="display: none">
                <label class="col-sm-3 control-label">审批意见：</label>
                <div class="col-sm-8">
                    <input id="mOpinion" name="mOpinion" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "ruoyi/requisition";
        $("#form-requisition-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-requisition-edit').serialize());
            }
        }
    </script>
</body>
</html>